export function leavePageTracker(startTime, data) {
    let endTime = new Date().getTime()
    let time = parseInt((endTime - startTime) / 1000)
    window.xsy.tracker.track('leavePage', {...data, stay_time_seconds: time })
}
export function tracker(data, type = 'viewPage') {
    if (type === 'viewPage') {
        setTimeout(() => {
            window.xsy.tracker ?.track(type, data)
        }, 200)
    } else {
        window.xsy.tracker ?.track(type, data)
    }
}